import store from 'src/vuex/store';
import Toast from "cube-ui/lib/toast"

const lang_type = store.state.lang.current_lang;
let loading_toast = null;

function showLoadingToast() {
  loading_toast = Toast.$create({
    time: 0,
    txt: messages[lang_type].common.wait,
  })
  loading_toast.show()
}

function hideLoadingToast() {
  loading_toast.hide()
}

export function showLottieLoading() {
  store.commit('lottieLoading/show');
}

export function hideLottieLoading() {
  store.commit('lottieLoading/hide');
}